function LogLikelihood = IndivVoterObjFun_Weight(Theta, VoteDem, VoterIdeal, CandTypeDem, CandTypeRep, DemCandIdeal, DemPartyIdeal, RepCandIdeal, RepPartyIdeal, RHSControls, UtilFuncParam, ChoiceProbForm, Weights)

Lambdas = Theta(1:3,:);
Betas = Theta(4:6,:);
Gamma = Theta(length(Theta),:);

if length(RHSControls(1,:)) >= 1
    RHSCoeff = Theta(7:6+length(RHSControls(1,:)),:);
    SingleIndexVal = CandTypeDem(:,1:3)*Betas(1:3,:) - CandTypeRep(:,1:3)*Betas(1:3,:) + RHSControls*RHSCoeff;
else
    SingleIndexVal = CandTypeDem(:,1:3)*Betas(1:3,:) - CandTypeRep(:,1:3)*Betas(1:3,:);
end


EstPosDem=(repmat(DemCandIdeal, 1, 3).*CandTypeDem)*(1-Lambdas)+ (repmat(DemPartyIdeal, 1, 3).*CandTypeDem)*(Lambdas);
EstPosRep=(repmat(RepCandIdeal, 1, 3).*CandTypeRep)*(1-Lambdas)+ (repmat(RepPartyIdeal, 1, 3).*CandTypeRep)*(Lambdas);
SingleIndexPolicy = -Gamma.*abs(EstPosDem-VoterIdeal).^UtilFuncParam+Gamma.*abs(EstPosRep-VoterIdeal).^UtilFuncParam;

SingleIndex = SingleIndexPolicy + SingleIndexVal;

if ChoiceProbForm == 1

    PrVoteLeft = normcdf(SingleIndex, 0, 1);

elseif ChoiceProbForm == 2
    
    PrVoteLeft = exp(SingleIndex)./(1+exp(SingleIndex));
    
end

PrVoteLeft(PrVoteLeft==0,:) = 10^(-10);
PrVoteLeft(PrVoteLeft==1,:) = 1-10^(-10);

LogLikelihood = -sum(Weights.*(VoteDem.*log(PrVoteLeft)+(1-VoteDem).*log(1-PrVoteLeft)));